var mongoose = require('mongoose');
var constants = require('commom').constants;

mongoose.connect(constants.mongodb.db, function (err) {
  if (err) {
    console.error('connect to %s error: ', constants.mongodb, err.message);
//    process.exit(1);
  }
});

mongoose.connection.on('error', function(err){
    console.log(err);
});



require('./OrderModel');
require('./FileModel');


exports.OrderModel = mongoose.model('tab_order');
exports.FileModel = mongoose.model('tab_file');

